#include<stdio.h>
#include<string.h>
#include<errno.h>
#include<sys/resource.h>


void print_limits(char* name, int resource)
{
	struct rlimit limit;
	if(getrlimit(resource, &limit) < 0)
	{
		printf("getrlimit for %s failure: %S\n", strerror(errno));
		return ;
	}

	printf("%-15s", name);
	if(limit.rlim_cur == RLIM_INFINITY)
	{
		printf("(infinite)		");
	}
	else
	{
		printf
	}
}

